<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="${path}/statics/layui/css/layui.css">
</head>
<body>

<!-- 查询条件 -->
<div class="layui-fluid" >
    <div class="layui-card">
      <div class="layui-form layui-card-header layuiadmin-card-header-auto">
        <div class="layui-form-item" style="  overflow-block: unset;">
			<div class="immmg" style="height: 80px;width: 250px;">
				<img  src="http://127.0.0.1:9999/userImg/${adver0.newFileName}" style="height :80px" >
			</div>
        	<button type="button" class="layui-btn" id="uploadId0" >
			  <i class="layui-icon">&#xe67c;</i>上传logo
			</button>
        </div>
        <div class="layui-form-item" >
        	<div class="immmg" style="height: 80px;width: 800px;">
        		<img src="http://127.0.0.1:9999/userImg/${adver1.newFileName}" style="height :80px" />
        	</div>
        	<button type="button" class="layui-btn" id="uploadId1" >
        	  <i class="layui-icon">&#xe67c;</i>上传广告1
        	</button>
        </div>
		<div class="layui-form-item" >
			<div class="immmg" style="height: 120px;width: 1200px;">
				<img src="http://127.0.0.1:9999/userImg/${adver2.newFileName}" style="height :120px" />
			</div>
        	<button type="button" class="layui-btn" id="uploadId2" >
			  <i class="layui-icon">&#xe67c;</i>上传广告2
			</button>
        </div>
      </div>
   </div>
</div>     
	
<script src="${path}/statics/layui/layui.js"></script>
<script>
//JavaScript代码区域
layui.use(['jquery','layer','upload'], function(){

  var $ = layui.jquery;
  var layer = layui.layer;
  var upload = layui.upload;
  
  //执行实例
   var uploadInst = upload.render({
     elem: '#uploadId0' //绑定元素
     ,url: '${path}/adverCtl/toUploadImg?position=0' //上传接口
     ,accept: 'images'
     ,field: 'adverImg'
     ,multiple: true
     ,done: function(res){
       //上传完毕回调
       if(res==0){
     	  layer.msg("上传成功",{icon:1});
     	  location.reload();
       }else{
     	  layer.msg("上传失败",{icon:5});
       }  
     }
  //   ,error: function(){
       //请求异常回调
     //}
   });
  
 //执行实例
   var uploadInst1 = upload.render({
     elem: '#uploadId1' //绑定元素
     ,url: '${path}/adverCtl/toUploadImg?position=1' //上传接口
     ,accept: 'images'
     ,field: 'adverImg'
     ,multiple: true
     ,done: function(res){
       //上传完毕回调
       if(res==0){
     	  layer.msg("上传成功",{icon:1});
     	  location.reload();
       }else{
     	  layer.msg("上传失败",{icon:5});
       }  
     }
  //   ,error: function(){
       //请求异常回调
     //}
   });
 //执行实例
   var uploadInst2 = upload.render({
     elem: '#uploadId2' //绑定元素
     ,url: '${path}/adverCtl/toUploadImg?position=2' //上传接口
     ,accept: 'images'
     ,field: 'adverImg'
     ,multiple: true
     ,done: function(res){
       //上传完毕回调
       if(res==0){
     	  layer.msg("上传成功",{icon:1});
     	  location.reload();
       }else{
     	  layer.msg("上传失败",{icon:5});
       }  
     }
  //   ,error: function(){
       //请求异常回调
     //}
   });
  //点击查询按钮的处理事件
  $("#searchBtn").click(function(){
	 // alert();
	 
	
	  
  });
});


</script>



</body>
</html>